
import axios from 'axios';

/**
 * 角色薪资
 */
export class RoleSalaryService {
    // 分页查询列表
    static findRoleSalarys (queryParams) {
        return axios({
            url: '/restaurant/staff/RoleSalary/findRoleSalarys',
            method: 'POST',
            data: queryParams
        });
    }

    //根据ID查询指定的角色薪资
    static findRoleSalary (roleSalaryId) {
        const query = {
            roleSalaryId
        }
        return axios({
            url: '/restaurant/staff/RoleSalary/findRoleSalary',
            method: 'POST',
            params: query,
        });
    }

    //根据ID查询指定的角色薪资(包含外键名称)
    static findRoleSalaryForView (roleSalaryId) {
        const query = {
            roleSalaryId
        }
        return axios({
            url: '/restaurant/staff/RoleSalary/findRoleSalaryForView',
            method: 'POST',
            params: query,
        });
    }

    //根据ID查询指定的角色薪资(包含外键名称)
    static findRoleSalaryForEdit (roleSalaryId) {
        const query = {
            roleSalaryId
        }
        return axios({
            url: '/restaurant/staff/RoleSalary/findRoleSalaryForEdit',
            method: 'POST',
            params: query,
        });
    }

    //根据ID查询指定的角色薪资(只提取ID 和 Name)
    static findRoleSalarysWithIdNameById (roleSalaryId) {
        const query = {
            roleSalaryId
        }
        return axios({
            url: '/restaurant/staff/RoleSalary/findRoleSalarysWithIdNameById',
            method: 'POST',
            params: query,
        });
    }

    //根据名称查询角色薪资集合(只提取ID 和 Name)
    static findRoleSalarysWithIdNameByName (roleSalaryName) {
        const query = {
            roleSalaryName
        }
        return axios({
            url: '/restaurant/staff/RoleSalary/findRoleSalarysWithIdNameByName',
            method: 'POST',
            params: query,
        });
    }

    //新增保存角色薪资
    static saveRoleSalary (roleSalary) {
        const query = {}
        return axios({
            url: '/restaurant/staff/RoleSalary/saveRoleSalary',
            method: 'POST',
            params: query,
            data: roleSalary
        });
    }

    //修改保存角色薪资
    static updateRoleSalary (roleSalary) {
        const query = {}
        return axios({
            url: '/restaurant/staff/RoleSalary/updateRoleSalary',
            method: 'POST',
            params: query,
            data: roleSalary
        });
    }

    //根据ID查询指定的角色薪资(只提取ID 和 Name)
    static deleteRoleSalary (roleSalaryId) {
        const query = {
            roleSalaryId
        }
        return axios({
            url: '/restaurant/staff/RoleSalary/deleteRoleSalary',
            method: 'POST',
            params: query,
        });
    }
}
